public class Test {
    //获取二进制序列中的偶数位和奇数位，分别输出
    public static void main(String[] args) {
        int n = 7;
        for (int i = 31; i >= 1 ; i -= 2) {
            System.out.print(((n>>i) & 1)+" ");

        }//偶数
        System.out.println();
        for (int i = 30; i >= 0; i-=2) {
            System.out.print(((n>>i) & 1)+ " ");

        }



    }
}
